package com.wang.controller;

import com.wang.entity.ParkingSpace;
import com.wang.service.ParkingSpaceService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/parkingSpace")
public class ParkingSpaceController {
    @Resource
    private ParkingSpaceService parkingSpaceService;
    @RequestMapping("/add")
    public void addParkingSpace(ParkingSpace parkingSpace) {
        parkingSpaceService.addParkingSpace(parkingSpace);
    }
    @RequestMapping("/get")
    public List<ParkingSpace> getParkingSpace(Integer spaceNumber, Integer carNumber) {
        return parkingSpaceService.getParkingSpace(spaceNumber, carNumber);
    }
}
